'Used with StartX,StartY these coordinates determine
'a new rectangular region
Dim LastX, LastY As Integer
'Determines if the user is about to draw a new region
Dim NewRegion As Boolean
'An integer used in a little animation effect
'that makes sure that the regions already drawn
'show up well on pictures of all colors
Dim Col As Integer
Private Sub Form_Activate()
NofRegions = 0
'Check if the scrollbars should be shown
If picImage.Width > picContainer.Width Then
hsb1.Max = picImage.Width
hsb1.Visible = True
End If
If picImage.Height > picContainer.Height Then
vsb1.Max = picImage.Height
vsb1.Visible = True
End If
End Sub
Private Sub mnuExit_Click()
For Each frm In Forms
Unload frm
Next
End Sub
Private Sub mnuGetHTML_Click()
'If the user hasn't drawn any regions,then there's
'no HTML to generate
If NofRegions = 0 Then Exit Sub
'Input a name for the <MAP NAME= tag
mapname = InputBox("Give a name for the image map: " & vbCrLf & "(for the <MAP NAME=" & Chr(34) & "..." & Chr(34) & "> tag)", "Image map name")
If Trim(mapname) = "" Then Beep: Exit Sub
'Generate the HTML code
HTML = "<!-- Image map HTML code created with I m a g e M a p M a k e r by Theodore Kandiliotis , ionikh@hol.gr , http://www.geocities.com/SiliconValley/Network/5045 -->" & vbCrLf & _